#!/bin/bash

export Linux_Flavour_="@_linux_flavour@"
export System_="@_system@"
. @_BINDIR@/check_system.sh
if [ $same_system -eq 1 ]; then
	export SIMPATH="@SIMPATH@"
	export ROOTSYS="@ROOTSYS@"
	export FAIRROOTPATH="@FAIRROOTPATH@"
	if (@FULL_CONFIG_FILE@); then
		export GEANT4_LIBRARY_DIR="@GEANT4_LIBRARY_DIR@"
		export GEANT4_INCLUDE_DIR="@GEANT4_INCLUDE_DIR@"
		export GEANT4VMC_INCLUDE_DIR="@GEANT4VMC_INCLUDE_DIR@"
		export GEANT4VMC_LIBRARY_DIR="@GEANT4VMC_LIBRARY_DIR@"
		export GEANT4VMC_MACRO_DIR="@GEANT4VMC_MACRO_DIR@"
		export CLHEP_INCLUDE_DIR="@CLHEP_INCLUDE_DIR@"
		export CLHEP_LIBRARY_DIR="@CLHEP_LIBRARY_DIR@"
		export CLHEP_BASE_DIR="@CLHEP_BASE_DIR@"
		export PLUTO_LIBRARY_DIR="@PLUTO_LIBRARY_DIR@"
		export PLUTO_INCLUDE_DIR="@PLUTO_INCLUDE_DIR@"
		export PYTHIA6_LIBRARY_DIR="@PYTHIA6_LIBRARY_DIR@"
		export G3SYS="@G3SYS@"
		export GEANT3_INCLUDE_DIR="@GEANT3_INCLUDE_DIR@"
		export GEANT3_LIBRARY_DIR="@GEANT3_LIBRARY_DIR@"
		export GEANT3_LIBRARIES="@GEANT3_LIBRARIES@"
		export USE_VGM="1"
		export PYTHIA8DATA="@PYTHIA8DATA@"
		export CLASSPATH="@MY_CLASSPATH@"

		export G4LEDATA="@G4LEDATA@"
		export G4LEVELGAMMADATA="@G4LEVELGAMMADATA@"
		export G4NeutronHPCrossSections="@G4NeutronHPCrossSections@"
		export G4NEUTRONHPDATA="@G4NeutronHPCrossSections@"
		export G4NEUTRONXSDATA="@G4NEUTRONXSDATA@"
		export G4PARTICLEXSDATA="@G4PARTICLEXSDATA@"
		export G4PIIDATA="@G4PIIDATA@"
		export G4RADIOACTIVEDATA="@G4RADIOACTIVEDATA@"
		export G4REALSURFACEDATA="@G4REALSURFACEDATA@"
		export G4SAIDXSDATA="@G4SAIDXSDATA@"
		export G4ENSDFSTATEDATA="@G4ENSDFSTATEDATA@"
	fi
	export ROOT_LIBRARY_DIR="@ROOT_LIBRARY_DIR@"
	export ROOT_LIBRARIES="@ROOT_LIBRARIES@"
	export ROOT_INCLUDE_DIR="@ROOT_INCLUDE_DIR@"
	export ROOT_INCLUDE_PATH="@GEANT3_INCLUDE_DIR@:@ROOT_INCLUDE_PATH@"
	export VMCWORKDIR="@VMCWORKDIR@"
	export FAIRLIBDIR="@FAIRLIBDIR@"
	export PYTHONPATH="@MY_PYTHONPATH@"
	case $1 in
		-a | --append )
			export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:"@MY_DYLD_LIBRARY_PATH@"
			export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"@MY_LD_LIBRARY_PATH@"
			export PATH=$PATH:"@MY_PATH@"
			;;
		-p | --prepend )
			export DYLD_LIBRARY_PATH="@MY_DYLD_LIBRARY_PATH@":$DYLD_LIBRARY_PATH
			export LD_LIBRARY_PATH="@MY_LD_LIBRARY_PATH@":$LD_LIBRARY_PATH
			export PATH="@MY_PATH@":$PATH
			;;
		* )
			export DYLD_LIBRARY_PATH="@MY_DYLD_LIBRARY_PATH@"
			export LD_LIBRARY_PATH="@MY_LD_LIBRARY_PATH@"
			export PATH="@MY_PATH@"
			;;
	esac
fi
